//
//  TabViewController.m
//  NBAApp
//
//  Created by 刘意明 on 16/11/30.
//  Copyright © 2016年 Manito. All rights reserved.
//

#import "TabViewController.h"
#import "NavViewController.h"
#import "MatchViewController.h"
#import "NewViewController.h"
#import "DataViewController.h"
#import "MoreViewController.h"
#import "MovieViewController.h"
@interface TabViewController ()

@end

@implementation TabViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setTabBarC] ;
}
-(void)setTabBarC
{
    //控制标签
    NavViewController * nvc1 = [[NavViewController alloc]initWithRootViewController:[[MatchViewController alloc]init]] ;
    NavViewController * nvc2 = [[NavViewController alloc]initWithRootViewController:[[NewViewController alloc]init]] ;
    NavViewController * nvc4 = [[NavViewController alloc]initWithRootViewController:[[DataViewController alloc]init]] ;
    NavViewController * nvc3 = [[NavViewController alloc]initWithRootViewController:[[MovieViewController alloc]init]] ;
    NavViewController * nvc5 = [[NavViewController alloc]initWithRootViewController:[[MoreViewController alloc]init]] ;
    
    UITabBarItem * tab1 =[[UITabBarItem alloc]initWithTitle:@"比赛" image:[UIImage imageNamed:@"篮球.png"]  selectedImage:[UIImage imageNamed:@"篮球1.png"]] ;
    
    UITabBarItem * tab2 =[[UITabBarItem alloc]initWithTitle:@"最新" image:[UIImage imageNamed:@"最新.png"]  selectedImage:[UIImage imageNamed:@"最新1.png"]] ;
    
    UITabBarItem * tab3 =[[UITabBarItem alloc]initWithTitle:@"视频" image:[UIImage imageNamed:@"视频.png"]  selectedImage:[UIImage imageNamed:@"视频1.png"]] ;
    
    UITabBarItem * tab4 =[[UITabBarItem alloc]initWithTitle:@"数据" image:[UIImage imageNamed:@"数据.png"]  selectedImage:[UIImage imageNamed:@"数据1.png"]] ;
    
    UITabBarItem * tab5 =[[UITabBarItem alloc]initWithTitle:@"更多" image:[UIImage imageNamed:@"更多.png"]  selectedImage:[UIImage imageNamed:@"更多1.png"]] ;
    
    // 联系 标签和导航
    nvc1.tabBarItem = tab1 ;
    nvc2.tabBarItem = tab2 ;
    nvc3.tabBarItem = tab3 ;
    nvc4.tabBarItem = tab4 ;
    nvc5.tabBarItem = tab5 ;
    self.viewControllers = @[nvc1, nvc2, nvc3, nvc4, nvc5] ;
    
    // 被选中颜色
    self.tabBar.tintColor = [UIColor blueColor] ;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
